<?php

namespace backend\models\system;

use Yii;

class Admin extends \common\models\system\Admin
{
    public $new_password;

    /**
     * 修改密码场景
     */
    const SCENARIOS_UPDATE_PASSWORD = 'scenarios_update_password';

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return array_merge(parent::rules(),[
            [['new_password'],'required','on' => [self::SCENARIOS_UPDATE_PASSWORD]]
        ]);
    }
}
